<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<script type="text/javascript">
		function setCookie(name,value){//the name and value of cookie
			var days =30;//此cookie保存30天
			var exp = new Date();
			exp.setTime(exp.getTime()+days*24*60*60*1000);//要乘以1000吗
			//document.cookie = name+"="+escape(value)+";expires"=exp.toGMTString();
		}
		//取出cookie中的值
		function getCookie(name){
			var arr=document.cookie.match(new RegExp("(^)"+name+"=([^;]*)(;$)"))
			if(arr!=null)
				return unescape(arr[2]);
			return null;
		}
	</script>
</body>
</html>